#usage checkDir.sh ipaddr directory
if
ssh $1 ls $2 >> /tmp/dir
then
echo "yes"
else
echo "no"
fi